#include "probar.h"
#include <unistd.h>
double total = 1024.0;
double speed = 1.0; // 1MB/s

void DownLoad()
{
	double cur = 0.0;
	while(cur <= total)
	{
		//显示下载进度
		probar(total , cur);
		//下载
		usleep(1000);
		cur += speed;
	}
	//打印出这次下载的总量
	printf("\nDownLoad %.2lfMB Done ..\n",cur);
	
}

int main()
{
	DownLoad();
	return 0;
}
